﻿using System;
using System.Collections.Generic;
using System.Text;
using Castle.ActiveRecord;
using Castle.Components.Validator;
using Wolfut.MirageEE.Kernal.Common;

namespace Wolfut.MirageEE.Domain.Common
{
    /// <summary>
    /// 数据字典
    /// </summary>
    /// <remarks>
    /// Author: LEO
    /// Date:2009-03-15
    /// </remarks>
    [ActiveRecord("DATA_DICTIONARYS")]
    [Serializable]
    public class DataDictionary : PersistentObjectWithGuid
    {
        #region 数据类别
        private string category = string.Empty;
        [Property("CATEGORY")]
        [ValidateNonEmpty, ValidateLength(0, 100, "数据类别超长")]
        public virtual string Category
        {
            get { return category; }
            set { category = value; }
        }
        #endregion

        #region 代码
        private string code = string.Empty;
        [Property("CODE")]
        [ValidateLength(0, 100, "代码超长")]
        public virtual string Code
        {
            get { return code; }
            set { code = value; }
        }
        #endregion

        #region 数据描述
        private string codeDesc = string.Empty;
        [Property("CODE_DESC")]
        [ValidateLength(0, 510, "数据描述超长")]
        public virtual string CodeDesc
        {
            get { return codeDesc; }
            set { codeDesc = value; }
        }
        #endregion

        #region 备注
        private string remarks = string.Empty;
        [Property("REMARKS")]
        [ValidateLength(0, 510, "备注超长")]
        public virtual string Remarks
        {
            get { return remarks; }
            set { remarks = value; }
        }

        #endregion

        #region 生效日期
        private DateTime effectiveStartDate;
        [Property("EFFECTIVE_START_DATE")]
        public virtual DateTime EffectiveStartDate
        {
            get { return effectiveStartDate; }
            set { effectiveStartDate = value; }
        }
        #endregion

        #region 失效日期
        private DateTime invalidate;
        [Property("INVALIDATE")]
        public virtual DateTime Invalidate
        {
            get { return invalidate; }
            set { invalidate = value; }
        }
        #endregion

        #region 编号顺序
        private short codeSequence;
        [Property("CODE_SEQUENCE")]
        public virtual short CodeSequence
        {
            get { return codeSequence; }
            set { codeSequence = value; }
        }
        #endregion

        #region 是否删除
        private bool isDeleted;
        [Property("IS_DELETED")]
        public virtual bool IsDeleted
        {
            get { return isDeleted; }
            set { isDeleted = value; }
        }
        #endregion
    }
}
